﻿
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>评论管理</title>
    <link href="~/plugins/layui/css/layui.css" rel="stylesheet" />
</head>
<body style="margin-left:10px;margin-top:10px;">
    <div id="ss" class="layui-form-item">
        <div class="layui-inline">
            <div class="layui-input-inline" style="width: 30px;">
                <i class="layui-icon" style="font-size: 30px; color: #1E9FFF;">&#xe615;</i>
            </div>
            <div class="layui-input-inline" style="width: 150px;">
                <input type="text" value="@Request.QueryString["ddgid"]" name="ddgid" class="layui-hide" />
                <input type="text" value="@Request.QueryString["cpgid"]" name="cpgid" class="layui-hide" />
                <input type="text" value="@Request.QueryString["usergid"]" name="usergid" class="layui-hide" />
                <input type="text" placeholder="会员手机号" name="account" class="layui-input" />
            </div>
            <div class="layui-input-inline" style="width: 150px;">
                <input type="text" placeholder="商家名称" name="name" class="layui-input" />
            </div>
            <div class="layui-input-inline" style="width: 150px;">
                <input type="text" placeholder="开始时间" name="stime" autocomplete="off" lay-verify="date" class="layui-input" onclick="layui.laydate({ elem: this, istime: true, festival: true, format: 'YYYY-MM-DD hh:mm:ss' })" />
            </div>
            <div class="layui-form-mid">-</div>
            <div class="layui-input-inline" style="width: 150px;">
                <input type="text" placeholder="结束时间" name="etime" autocomplete="off" lay-verify="date" class="layui-input" onclick="layui.laydate({ elem: this, istime: true, festival: true, format: 'YYYY-MM-DD hh:mm:ss' })" />
            </div>
            <div class="layui-input-inline">
                <button onclick="getlist(1);" class="layui-btn">给偶搜</button>
            </div>
        </div>
    </div>
    <div class="layui-form">
        <table class="layui-table">
            <thead>
                <tr>
                    <th>评价会员</th>
                    <th>商家名称</th>
                    <th>评价内容</th>
                    <th>回复内容</th>
                    <th>回复时间</th>
                    <th>会员评价</th>
                    <th>商家评价</th>
                    <th>评价时间</th>
                    <th>操作管理</th>
                </tr>
            </thead>
            <tbody id="tbody">
                <script id="tpl" type="text/html">
                    {{each list as item index}}
                    <tr id="{{item.gid}}">
                        <td>{{item.account}}</td>
                        <td>{{item.name}}</td>
                        <td>{{item.msg}}</td>
                        <td>{{item.tomsg}}</td>
                        <td>{{item.pltime}}</td>
                        <td>
                            {{if item.shoppj=="2"}}
                                合格
                            {{else if item.shoppj=="3"}}
                                差
                            {{else}}
                                优
                            {{/if}}<button class="layui-btn layui-btn-mini" onclick="Showiframe('会员上传的图片','/ljsheng/plimg?gid={{item.gid}}&lx=1');">图</button>
                        </td>
                        <td>
                            {{if item.userpj=="2"}}
                                合格
                            {{else if item.userpj=="3"}}
                                差
                            {{else}}
                                优
                            {{/if}}<button class="layui-btn layui-btn-mini" onclick="Showiframe('商家上传的图片','/ljsheng/plimg?gid={{item.gid}}&lx=2');">图</button>
                        </td>
                        <td>{{item.addtime}}</td>
                        <td>
                            <div class="layui-btn-group">
                                <button class="layui-btn" onclick="Showiframe('{{item.name}}','/ljsheng/plau?gid={{item.gid}}');">编辑</button>
                                <button class="layui-btn" onclick="Delete('{{item.gid}}');">删除</button>
                            </div>
                        </td>
                    </tr>
                    {{/each}}
                </script>
            </tbody>
        </table>
    </div>
    <div id="page"></div>
    共 <label id="pages">0</label> 页, <label id="count">0</label> 条数据
    <label id="Controllers" class="layui-hide">pl</label>
    <script src="~/js/jquery.js"></script>
    <script src="~/plugins/layui/layui.js"></script>
    <script src="~/js/template-web.js"></script>
    <script src="~/js/list.js"></script>
    <script>
        page(@ViewBag.pages,@ViewBag.pageindex);
        //删除数据
        function Delete(gid) {
            layer.confirm('你确定要执行此操作吗？', {
                btn: ['确定', '取消'] //按钮
            }, function () {
                $.ajax({
                    url: "/ljsheng/pldelete",
                    data: "gid=" + gid,
                    type: "post",
                    cache: false,
                    timeout: 8000,
                    dataType: "json",
                    ContentType: "application/json; charset=utf-8",
                    error: function () { layer.msg("请求超时"); },
                    beforeSend: function () { },
                    success: function (data) {
                        if (data.result == 200) {
                            $("#" + gid).hide(5);
                            layer.msg(data.data, { icon: 1 });
                        }
                        else {
                            layer.msg(data.data);
                        }
                    },
                });
            });
        }
    </script>
</body>
</html>
